package com.example.demo.service.impl;

import com.example.demo.dao.FileDao;
import com.example.demo.pojo.FileBean;
import com.example.demo.service.FileService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Classname FIleService
 * @Description TODO
 * @Date 2020/12/27 21:04
 * @Created by 新
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class FileServiceImpl implements FileService {
    @Autowired
    FileDao fileDao;

    @Override
    public List<FileBean> getFileList() {
        return fileDao.getFileList();
    }


    public FileBean getFileByName(String fileName) {
        return fileDao.getFileByName(fileName);
    }

    @Override
    public int addFile(FileBean fileBean) {
        return fileDao.addFile(fileBean);
    }
}
